﻿#include "Snake.h"

int main()
{
	srand((unsigned int)time(NULL));
	SetConsole();		/*控制台设置*/
	MainPage();			/*进入游戏的提示*/
	StartSrint();		/*边界和提示信息的输出*/
	char judge;
	do
	{
		menu();
		judge = Option();
		switch (judge)
		{
		case '1':
		{
			RunTheGame();	/*进入开始游戏*/
			break;
		}
		case '0':
			break;
		}
	} while (judge != '0');
	MySetConsoleCursorPosition(2 * (LENGTH_GAME + 1) + 2, 19);
	printf("------------您已退出游戏------------");
	MySetConsoleCursorPosition(2 * (LENGTH_GAME + 1) + 3, 20);
	system("pause");
	MySetConsoleCursorPosition(0, WIDTH_GAME+1);/*设置光标最后的位置*/
	return 0;
}
